﻿<%@ Page Language="C#" MasterPageFile="~/defaultLayout.master" AutoEventWireup="true" CodeFile="Agenda.aspx.cs" Inherits="Agenda" %>
<%@ MasterType  virtualPath="~/defaultLayout.master"%>
<asp:Content ID="maincontent" ContentPlaceHolderID="main" runat="server">
        <div class="content">
            <div id="movieListContainer">
                <div id="dropdownPlanning">
                    <asp:DropDownList ID="ddlPlanning"  OnSelectedIndexChanged="ddlPlanning_SelectedIndexChanged" AutoPostBack="true" runat="server"></asp:DropDownList>
                </div>
                <asp:ListView runat="server" OnItemDataBound="movieList_ItemDataBound" OnPagePropertiesChanging="movieList_PagePropertiesChanging" ID="movieList">
                    <LayoutTemplate>
                        <asp:DataPager OnInit="movieDataPager_Init" ID="movieDataPager" runat="server" PagedControlID="movieList" PageSize="5">
                            <Fields>
                                <asp:NextPreviousPagerField ButtonType="Button" ShowNextPageButton="false" ShowPreviousPageButton="true"></asp:NextPreviousPagerField>
                                <asp:NumericPagerField></asp:NumericPagerField>
                                <asp:NextPreviousPagerField ButtonType="Button" ShowNextPageButton="true" ShowPreviousPageButton="false"></asp:NextPreviousPagerField>
                            </Fields>
                        </asp:DataPager>
                        <ul>
                        <asp:PlaceHolder ID="itemPlaceholder" runat="server" />
                        </ul>
                        <asp:DataPager OnInit="movieDataPage2_Init" ID="movieDataPage2" runat="server" PagedControlID="movieList" PageSize="5">
                            <Fields>
                                <asp:NextPreviousPagerField ButtonType="Button" ShowNextPageButton="false" ShowPreviousPageButton="true" NextPageText="Volgende" PreviousPageText="Vorige"></asp:NextPreviousPagerField>
                                <asp:NumericPagerField></asp:NumericPagerField>
                                <asp:NextPreviousPagerField ButtonType="Button" ShowNextPageButton="true" ShowPreviousPageButton="false" NextPageText="Volgende" PreviousPageText="Vorige"></asp:NextPreviousPagerField>
                            </Fields>
                        </asp:DataPager>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <div id="movieContainer">
                            <asp:HiddenField ID="movieID" runat="server" Value='<%# Eval("film_id") %>' />
                            <div id="imageContainer">
                                <div id="movieImg">
                                    <asp:HyperLink NavigateUrl='<%#"~/FilmInfo.aspx?movieID=" + Eval("film_id") %>' runat="server">
                                        <asp:Image ImageUrl='<%# Eval("url") %>' height="180px" runat="server" />
                                    </asp:HyperLink>
                                </div>
                            </div>
                            <div id="movieContentContainer">
                                <div id="movieName">
                                    <asp:HyperLink NavigateUrl='<%#"~/FilmInfo.aspx?movieID=" + Eval("film_id") %>' runat="server">
                                        <asp:Label runat="server" Text='<%# Eval("naam") %>' ID="lblMovieName"></asp:Label>
                                    </asp:HyperLink>
                                </div>
                                <div id="movieSummary"><asp:Label runat="server" ID="lblMovieSummary"></asp:Label></div>
                                <br />
                                <div id="movieGenres"><asp:Label ID="movieGenre" runat="server" /></div>
                                <br />
                                <div id="movieRated">
                                    <asp:repeater runat="server" id="movieListRated" DataSource='<%# Eval("Kijkwijzers") %>'>
                                        <ItemTemplate>
                                            <asp:Image runat="server" Width="30px" ImageUrl='<%# Eval("kijkwijzer_symbool") %>' />
                                        </ItemTemplate>
                                    </asp:repeater>
                                </div>
                                <br />
                                <div id="movieTimes">
                                    <asp:repeater runat="server" OnItemDataBound="movieListTimes_ItemDataBound" id="movieListTimes">
                                        <ItemTemplate>
                                            <asp:HiddenField runat="server" Value='<%# Eval("planning_id") %>' ID="planningID" />
                                            <asp:Button runat="server" OnClick="btnMovieTime_Click" ID="btnMovieTime" />
                                        </ItemTemplate>
                                    </asp:repeater>
                                </div>
                            </div>
                        </div>
                    </ItemTemplate>
                    <EmptyDataTemplate>
                        <asp:Label runat="server" ID="lblNotification" Text="Er zijn (nog) geen films ingepland voor deze dag." />
                    </EmptyDataTemplate>
                </asp:ListView>
            </div>
        </div>
</asp:Content>